package com.ktjy.springthymeleaf.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.util.Date;

/**
 * @return 13141
 * 2025/7/14
 * 17:26
 */
@Data
@TableName("sys_right")
public class Right {
    @TableId
    @TableField("right_code")
    private String rightCode;  // 编号
    @TableField("right_parent_code")
    private String right_parentCode;  // 父级编号
    @TableField("right_type")
    private String rightType;  // 类型
    @TableField("right_text")
    private String rightText;  // 名称
    @TableField("right_url")
    private String rightUrl;  // url地址
    @TableField("right_tip")
    private String rightTip;  // 说明
    @Version
    private Integer version;  // 版本
    private Boolean deleted;  // 逻辑删除
    // createTime 和 updateTime 字段将由 MyBatis-Plus 自动填充
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    @TableField(fill = FieldFill.UPDATE)
    private Date updateTime;

    // 构造函数
    public Right() {
    }

    public Right(String rightCode, String right_parentCode, String rightType, String rightText, String rightUrl, String rightTip) {
        this.rightCode = rightCode;
        this.right_parentCode = right_parentCode;
        this.rightType = rightType;
        this.rightText = rightText;
        this.rightUrl = rightUrl;
        this.rightTip = rightTip;
    }

    public Right(String right_parentCode, String rightType, String rightText, String rightUrl, String rightTip) {
        this.right_parentCode = right_parentCode;
        this.rightType = rightType;
        this.rightText = rightText;
        this.rightUrl = rightUrl;
        this.rightTip = rightTip;
    }
}
